package com.triones.ljr.controller.api;

import cn.dev33.satoken.annotation.SaIgnore;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.R;
import com.triones.ljr.entity.dto.IndustryCodeDO;
import com.triones.ljr.entity.vo.IndustryVO;
import com.triones.ljr.service.IndustryService;
import lombok.RequiredArgsConstructor;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * api - 行业分类
 *
 * @Author: triones
 */
@Validated
@RequiredArgsConstructor
@RestController
@RequestMapping("/api/industry")
public class ApiIndustryController extends BaseController {

    private final IndustryService industryService;

    /**
     * 行业数据（所有）
     */
    @SaIgnore
    @GetMapping("/list")
    public R<List<IndustryVO>> industryList() {
        return R.ok(industryService.industryList());
    }
}
